#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
void solve()
{
    int i = 0;
    int j = 0;
    char temp = 0;
    ll sum = 0;
    char s[14] = {0};
    cin >> temp;
    while (i < 9)
    {
        if (temp != '-')
        {
            i++;
            sum += (temp - '0') * i;
        }
        s[j++] = temp;
        cin >> temp;
    }
    s[11] = temp;
    cin >> s[12];
    if (sum % 11 == 10)
    {
        if (s[12] != 'X')
        {
            s[12] = 'X';
            cout << s;
        }
        else
            cout << "Right";
    }
    else if ((s[12] - '0') != sum % 11)
    {
        s[12] = sum % 11 + '0';
        cout << s;
    }
    else
        cout << "Right";
}
int main()
{
    solve();
    return 0;
}
